.pluginsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;

  .pluginCard {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 16px;
    padding-bottom: 25px;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
    position: relative;
    transition: all 0.2s;
    background: #FFFFFF;
    border: 1px solid #EEEEEE;

    :global(.dark) & {
      background: #292A2C;
      border: 1px solid #292A2C;
      box-shadow: none;
    }

    &:hover {
      box-shadow: 0px 0px 24px 0px rgba(196, 199, 202, 0.5);

      :global(.dark) & {
        background: #2E2F32;
        box-shadow: none;
      }
    }

    .pluginContent {
      display: flex;
      margin-top: 10px;
      flex: 1;
    }

    .pluginIcon {
      width: 48px;
      height: 48px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #f5f5f5;
      color: #000;

      img {
        width: 100%;
        height: 100%;
        border-radius: 8px;
      }

      :global(.dark) & {
        background-color: #2A2A2A;
        color: #fff;
      }
    }

    .pluginInfo {
      flex: 1;
      margin-left: 16px;
      margin-top: 5px;

      .pluginName {
        font-weight: 600;
        font-size: 18px;
        color: #313131;

        :global(.dark) & {
          color: rgba(255, 255, 255, 0.9);
        }
      }

      .pluginNamespace {
        font-weight: 400;
        font-size: 13px;
        color: #888888;
        margin-top: 2px;

        :global(.dark) & {
          color: rgba(255, 255, 255, 0.5);
        }
      }
    }

    .installButton {
      // position: absolute;
      width: 62px;
      height: 28px;
      border-radius: 6px;
      top: 16px;
      right: 16px;
      padding: 4px 12px;
      border-radius: 4px;
      font-size: 14px;
      font-weight: 400;
      background: #353535;
      color: white;
      border: none;
      cursor: pointer;

      &:hover {
        background: #48494C
      }

      :global(.dark) & {
        border: 1px solid #3F4245;
        // background: #1F2023;
        background: none;

        &:hover {
          background: #3F4043;
        }
      }

      &.disabled {
        background-color: transparent;
        border: 1px solid rgba(0, 0, 0, 0.2);
        color: rgba(0, 0, 0, 0.5);

        :global(.dark) & {
          border-color: rgba(255, 255, 255, 0.2);
          color: rgba(255, 255, 255, 0.5);
        }
      }
    }

    .switchRoot {
      // position: absolute;
      top: 16px;
      right: 16px;
      width: 36px;
      height: 20px;
      background-color: rgba(0, 0, 0, 0.1);

      :global(.dark) & {
        background-color: rgba(255, 255, 255, 0.1);
      }

      border-radius: 10px;
      cursor: pointer;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      display: flex;
      align-items: center;
      cursor: pointer;

      :global(.dark) & {
        background-color: rgba(255, 255, 255, 0.1);
      }

      &[data-state='checked'] {
        background: linear-gradient(138deg, #6846F4 0%, #004DFF 39%, #00C4DE 76%, #52CE73 100%);
      }
    }

    .switchThumb {
      display: block;
      width: 16px;
      height: 16px;
      background-color: white;
      border-radius: 50%;
      box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
      transition: transform 100ms;
      transform: translateX(2px);
      will-change: transform;
      margin: 0 2px;

      &[data-state='checked'] {
        transform: translateX(16px);
      }
    }
  }
}

.loadingIndicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: rgba(0, 0, 0, 0.6);
  font-size: 14px;

  :global(.dark) & {
    color: rgba(255, 255, 255, 0.6);
  }
}



.status {
  // align-self: flex-start;
  font-size: 16px;
  margin-top: 10px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-right: 10px;
  position: relative;


  :global(.dark) & {
    color: rgba(255, 255, 255, 0.7);
  }

  .dropDown {
    position: absolute;
    top: 100%;
    right: -12px;
    width: 113px;
    height: 87px;
    background: #FFFFFF;
    box-shadow: 0px 5px 10px 0px rgba(206, 206, 206, 0.5);
    border-radius: 8px;
    border: 1px solid #E3E3E3;
    padding: 8px;
    opacity: 0;
    /* 默认隐藏 */
    transition: opacity 0.2s ease;
    pointer-events: none;
    /* 防止按钮影响父元素 hover 状态 */
    :global(.dark) & {
      background: #2F3033;
      border: 1px solid #2F3033;
      box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.3);
    }
    .dropDownItem {
      width: 97px;
      height: 32px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;

      span {
        margin-left: 8px;
        font-size: 14px;
        color: #353535;
      }

      &:hover {
        background: #F3F3F3;
      }

      :global(.dark) & {
        color: rgba(255, 255, 255, 0.7);
        span{
          color: rgba(255, 255, 255, 0.7);
        }
        &:hover {
          background: #3F4043;
        }
      }
    }
  }
}

.status:hover .dropDown {
  opacity: 1;
  /* 鼠标悬停时显示 */
  pointer-events: auto;
  /* 恢复按钮交互 */
}